import Vue from 'vue'
import Vuex from 'vuex'
import app from '../App.vue'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		wenJData: [],
		wenJuanText: '',
		oneId: '',
		duoId: '',
		wenid: '',
		tiName: '',
		wjType: '',
		wjSet: {},
		tiEditForm: {}
	},
	mutations: {
		setOneId(state, params) {
			state.oneId = params
		},
		setDuoId(state, params) {
			state.duoId = params
		},
		setWenId(state, params) {
			state.wenid = params
		},
		setWenJuanText(state, params) {
			state.wenJuanText = params
		},
		setTiName(state, params) {
			state.tiName = params
		},
		setWjType(state, params) {
			state.wjType = params
		},
		setWjSet(state, params) {
			state.wjSet = {...params}
		},
		setTiIndex(state, params) {
			state.tiIndex = params
		},
		setTiEditForm(state, params) {
			state.tiEditForm = {...params}
		}
	}
})

export default store
